package nbcondominios

class AdminFilters {
    /*    def filters = {
    adminOnly(controller:'*',
    action:"(create|edit|update|delete|save)") {
    before = {
    if(!session?.user?.admin){
    flash.message = "Disculpe, esta tarea es solo para administradores"
    redirect(controller:"user", action:"login")
    return false
    }
    }
    }
    }
    def filters = {
        loginCheck(controller:'*', action:'*') {
            before = {
                if(!session.user && !actionName.equals('login')) {
                    flash.message = "Disculpe, debe iniciar sesion en el sistema"
                    redirect(url:"http://localhost:8080/NBCondominios/anonymous.gsp")
                    return false
                }
            }
        }
    }*/
}    
